Intro

Inactivity observer

You can use this package to trigger events after x seconds of time. This inactivity observer is triggered on mousemove and on touchmove right now (might add more events). Works on mobile too. You can test it out on the example page I created.

Demo

Logout in:
00:00:00
trigger-attribute value:
Hover over this section to reset the time to logout.

Components

  • Inactivity observer

    Description...

    Replace this with a screenshot or embed the component

    Attributes

    show-helpboxShows the white box you currently see in the left corner at the bottom. This is just there to help you. You can leave it empty or set it to false.
    time_in_secondsAllows you to set the time. Use 3600 to set the timer to 1 hour or 60 to set 1 minute for example.
    trigger-attributeThe timer starts on attribute change so you can use any event to set the attribute (but you would have to set a variable first).

    Events

    time-leftThe event triggers everytime the remaining time changes and returns the value.
    time-is-upThis event fires once the time is up. You can use it to logout your user for example.